<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<%
    pageContext.setAttribute("basepath", request.getContextPath());
%>
<!DOCTYPE html>
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<%--表单必须携带隐藏域 name=_method --%>
<form action="${basepath}/order" method="post">
    <input type="hidden" name="id" value="${order.id}">

    <input type="hidden" name="_method" value="put">

    name:<input type="text" name="name" value="${order.name}"><br>
    ordertime:<input type="text" name="ordertime" value="${order.ordertime}"><br>
    totalprice:<input type="number" name="totalprice" value="${order.totalprice}"> <br>

    status:
    <c:if test="${order.status == 1}">
        <input type="radio" name="status" value="1" checked="checked">已支付
        <input type="radio" name="status" value="0">未支付
    </c:if>

    <c:if test="${order.status == 0}">
        <input type="radio" name="status" value="1">已支付
        <input type="radio" name="status" value="0" checked="checked">未支付
    </c:if>

    <br>
    <input type="submit" value="update"><br>
</form>
</body>
</html>